//
$('#resourceMonitoring-endDate').text(myDate.getFullYear()+"-"+parseInt(myDate.getMonth()+1)+"-"+myDate.getDate());
$('#resourceMonitoring-start').datepicker().
on('changeDate.datepicker.amui', function(event) {
    console.log(endDate.valueOf());
    console.log(event.date.valueOf());
    if (event.date.valueOf() > endDate.valueOf()) {
        layer.alert('开始日期应小于结束日期！');
    } else {
        startDate = new Date(event.date);
        $('#resourceMonitoring-startDate').text($('#resourceMonitoring-start').data('date'));
    }
    $(this).datepicker('close');
});
$('#resourceMonitoring-end').datepicker().
on('changeDate.datepicker.amui', function(event) {
    if (event.date.valueOf() < startDate.valueOf()) {
        layer.alert('结束日期应大于开始日期！');
    } else {
        endDate = new Date(event.date);
        $('#resourceMonitoring-endDate').text($('#resourceMonitoring-end').data('date'));
    }
    $(this).datepicker('close');
});
$("#resourceMonitoringSearch").click(function() {
    $("#resourceMonitoringIsSearch").val(1);
    $("#resourceMonitoringStartDateTemp").val($("#resourceMonitoring-startDate").html());
    $("#resourceMonitoringEndDateTemp").val($("#resourceMonitoring-endDate").html());
    $("#resourceMonitoringSearchContentTemp").val($("#resourceMonitoringSearchContent").val());
});
